function TrStyle(mainClass) {
	var that = this;
	var sClass = "trStyle_selected";
	var onClass = "trStyle_on";
	var eClass = "trStyle_even";

	this.Init = function(selectedClass, mouseOnClass, evenClass) {
		sClass = selectedClass;
		onClass = mouseOnClass;
		eClass = evenClass;
	}

	this.Select = function() {
		$("." + mainClass + " tr").click(function() {
			$("." + mainClass + " tr").removeClass(sClass);
			$(this).addClass(sClass);
		});
	}

	this.Hover = function() {
		$("." + mainClass + " tr").hover(function() {
			$("." + mainClass + " tr").removeClass(onClass);
			$(this).addClass(onClass);
		}, function() {
			$("." + mainClass + " tr").removeClass(onClass);
		});
	}

	this.Even = function() {
		$("." + mainClass + " tr:even").addClass(eClass);
	}

	this.Go = function() {
		that.Select();
		that.Hover();
		that.Even();
	}

}
$(function() { 
	var trStyle = new TrStyle("trStyleTable");
	trStyle.Go(); 
});
